<?php//销售台账控制器

namespace app\admin\model;

use think\Model;
use traits\model\SoftDelete;
class Sales extends Model
{
	use SoftDelete;
    // 表名
    protected $name = 'sales';
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';
    protected $deleteTime = 'deletetime';
    public function group()
    {
        return $this->belongsTo('items', 'project_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }        public function admin()    {        return $this->belongsTo('admin', 'admin_id', 'id', [], 'LEFT')->setEagerlyType(0);    }        public function user()    {        return $this->belongsTo('user', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0);    }

}
